// The module 'vscode' contains the VS Code extensibility API
// Import the module and reference it with the alias vscode in your code below
import * as vscode from 'vscode';
import { Commands } from './core/commands';

// this method is called when your extension is activated
// your extension is activated the very first time the command is executed
export function activate(context: vscode.ExtensionContext) {
	var extContext = context;
	var commands = new Commands(extContext);
	let funcs = Object.getPrototypeOf(commands);
	for (let key of Reflect.ownKeys(funcs)) {
		if (key !== "constructor" && typeof (key) === "string") {
			context.subscriptions.push(vscode.commands.registerCommand("astator-ext." + key, funcs[key].bind(commands)));
		}
	}
	
}

// this method is called when your extension is deactivated
export function deactivate() {}
